<template>
  <generate-form
    ref="generateForm"
    :form-conf="{
      ...formConf,
      fields: fields
    }"
    :page-form-model="{}"
  />
</template>
<script lang="ts" name="FormPreview" setup>
import { ref } from "vue";
import { BasicComponent } from "@/views/formgen/components/GenerateForm/types/form";
import GenerateForm from "@/views/formgen/components/GenerateForm/GenerateForm.vue";

const formConf = ref({
  fields: [] as BasicComponent[],
  labelPosition: "top",
  formKey: "temp001"
});

defineProps({
  fields: {
    type: Array,
    default: () => []
  }
});
</script>
<style scoped lang="scss"></style>
